From 2667ceab380d8b4cff4a1c275b85726c1169c647 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Sat, 9 Jul 2005 12:05:12 +0000 Subject: [PATCH] - enable native code building of ocaml-md5sums - no longer uses findlib - clean up --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1b19d57b..4606c348 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,4 @@ -SCRIPTS = postinst-ocaml postrm-ocaml # DEBHELPER_VERSION := $(shell grep-available -X -F Package -s Version debhelper | cut -f 2 -d ' ') DEBHELPER_VERSION = 4.9.3 OCAML_VERSION = 3.08.3 @@ -9,12 +8,18 @@ NEW_DEBHELPER_VERSION = $(DEBHELPER_VERSION)+dh_ocaml DEBHELPER_DIR = debhelper-$(DEBHELPER_VERSION) NEW_DEBHELPER_DIR = debhelper-$(NEW_DEBHELPER_VERSION) FED_SUMS = ocaml-nox.md5sums ocaml.md5sums ocaml-compiler-libs.md5sums +OCAMLC = ocamlc +OCAMLOPT = ocamlopt +OCAML_LIBS = unix str -# all: ocaml-md5sums $(SCRIPTS) debhelper -all: ocaml-md5sums $(SCRIPTS) +all: ocaml-md5sums +opt: ocaml-md5sums.opt +world: all opt ocaml-md5sums: ocaml-md5sums.ml - ocamlfind ocamlc -package str,unix -linkpkg -o $@ $< + $(OCAMLC) $(patsubst %,%.cma,$(OCAML_LIBS)) -o $@ $< +ocaml-md5sums.opt: ocaml-md5sums.ml + $(OCAMLOPT) $(patsubst %,%.cmxa,$(OCAML_LIBS)) -o $@ $< $(DEBHELPER_DSC): apt-get -d source debhelper @@ -51,5 +56,6 @@ ocaml-compiler-libs.md5sums: ocaml-md5sums ocaml-nox.md5sums wml -p 1-3 $< > $@ clean: - rm -f $(TARGETS) $(FED_SUMS) + rm -f ocaml-md5sums ocaml-md5sums.opt $(FED_SUMS) + rm -f *.cm[aiox] *.cmxa *.[ao] -- 2.30.2